<template>
<div class="hist">
  <div class="con">
    <div class="now-data-myself">
      <div class="now-data-myself-time">{{ date }}</div>
      <div class="now-data-myself-week">{{ week }}</div>
    </div>
    <Calendar
      v-on:choseDay="clickDay"
      v-on:changeMonth="changeDate"
      v-on:isToday="clickToday"
    ></Calendar>
  </div>
  <!-- <li class="setme">你好</li> -->
  <ul>
    <li class="callme">
      <div>上报单位</div>
      <div>是否上报</div>
      <div>操作</div>
    </li>
    <li>
      <div>第一大队</div>
      <div>是</div>
      <!-- <a href="" class="el-icon-view">查看</a> -->
      <!-- <div class="el-icon-view">查看</div> -->
      <a href="" class="el-icon-view">查看</a>
    </li>
    <li>
      <div>第二大队</div>
      <div>是</div>
      <a href="" class="el-icon-view">查看</a>
    </li>
    <li>
      <div>第三大队</div>
      <div>是</div>
      <a href="" class="el-icon-view">查看</a>
    </li>
    <li>
      <div>第四大队</div>
      <div>是</div>
      <a href="" class="el-icon-view">查看</a>
    </li>
    <li>
      <div>第五大队</div>
      <div>是</div>
      <a href="" class="el-icon-view">查看</a>
    </li>
    <li>
      <div>第六大队</div>
      <div>是</div>
      <a href="" class="el-icon-view">查看</a>
    </li>
    <li>
      <div>第七大队</div>
      <div>是</div>
      <a href="" class="el-icon-view">查看</a>
    </li>
  </ul>
  <div class="callmedad">
      <el-button type="primary" class="callbut">选择excel</el-button>
      <div class="nmp">
      <el-input
      class="callinp"
      placeholder="请输入内容"
      v-model="input"
      clearable>
      </el-input><br/>
      <el-button type="primary" class="callbto" @click="exporEXcel">导入</el-button>
      </div>
  </div>
</div>
</template>

<script>
import Calendar from 'vue-calendar-component';
// import { export_json_to_excel} from '../../utls/Export2Excel.js'
export default {
  components: {
    Calendar
  },
  methods:{
    // formatJson(filterVal,jsonData){
    //        return jsonData.map(v=>filterVal.map(j=>{
    //          return v[j]
    //        }))
    // },
    // exporEXcel(){
    //   const tHander = ['编号','上报单位','值班日期','上报时间','道路','路况']

    //   const filterVal = ['id','unit','date','dates','address','road']

    //   const data = this.formatJson(filterVal,this.arr)

    //   export_json_to_excel({
    //     header: tHander,//excel头部列表
    //     data,//数据
    //     filename:'测试文件',//文件名称
    //     autoWidth: true,//自适应宽
    //     bookType:'xlsx'//文件类型
    //   })
    // }
  },
  data() {
    return {
      date: "",
      week: "",
      input:""
    };
  },
  created() {
    var now = new Date();
    this.date = now.getDate();//得到日期
    var day = now.getDay();//得到周几
    var arr_week = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
    this.week = arr_week[day];
  },
  methods: {
    clickDay(data) {
      console.log(data); //选中某天
    },
    changeDate(data) {
      console.log(data); //左右点击切换月份
    },
    clickToday(data) {
      console.log(data); // 跳到了本月
    }
  },
};
</script>

<style>
/* 左上角日历 */ 
.hist{
  display: flex;
  flex-wrap:wrap;
}
.now-data-myself {
  /* width: 40%; */
  position: absolute;
  border-right: 1px solid rgba(227, 227, 227, 0.6);
}
.con {
  height: 330px;
  position: relative;
  max-width: 280px;
  /* margin: auto; */
  background-color: white;
  border-radius:10px;
  margin-right: 100px;
  margin-left: 30px;
}
.con .wh_content_all {
  background: transparent !important;
}
.wh_top_changge li {
  color: #F56C6C !important;
  font-size: 15px !important;
}
.wh_content_item, .wh_content_item_tag {
  color: #303133 !important;
}
.wh_content_item .wh_isToday {
  background: #00d985  !important;
  color: #fff  !important;
}
.wh_content_item .wh_chose_day {
  background: #409EFF  !important;
  color: #ffff  !important;
}
.wh_item_date:hover {
    background: rgb(217, 236, 255) !important;
    border-radius: 100px !important;
    color: rgb(102, 177, 255)  !important;
}
.wh_jiantou1[data-v-2ebcbc83] {
    border-top: 2px solid #909399;
    border-left: 2px solid #909399;
    width: 7px;
    height: 7px;
}
.wh_jiantou2[data-v-2ebcbc83] {
    border-top: 2px solid #909399;
    border-right: 2px solid #909399;
    width: 7px;
    height: 7px;
}
.wh_top_tag[data-v-2ebcbc83] {
  color: #409EFF;
  border-top: 1px solid rgba(227, 227, 227, 0.6);
  border-bottom: 1px solid rgba(227, 227, 227, 0.6);
}
.wh_container[data-v-2ebcbc83] {
    max-width: 280px;
}
.wh_top_changge[data-v-2ebcbc83] {
    display: flex;
    width: 50%;
    margin-left: 43%;
}
.now-data-myself-time {
  color: #F56C6C;
  font-size: 28px;
  height: 30px;
  font-family: "Helvetica Neue";
}
.now-data-myself-week {
  font-size: 10px;
  color: #909399;
}
.wh_top_changge .wh_content_li[data-v-2ebcbc83] {
  font-family: Helvetica;
}
/* 警情 */ 
.hist{
  margin-top: 20px;
  margin-left: 35px;
}
.hist>ul>li{
  width: 800px;
  height: 40px;
  background-color: white;
  margin-bottom:1px ;
  display: flex;
  justify-content: space-around;
  border-radius: 10px;
  line-height: 40px;
}
.hist>ul>li>a{
  line-height: 40px;
  color:skyblue;
}

.hist>ul>.callme>div{
  color:black;
  font-weight: bold;
}
.callmedad{
  width: 1500px;
  height: 180px;
  background-color: white;
  border-radius: 10px;
  margin: 30px 30px;
  padding: 20px 0px 0px 35px;
  display: flex;
}
.callmedad .callinp{
  width: 700px;
  margin-bottom: 20px;
}
.callmedad>.callbut{
  /* width: 10px; */
  height: 40px;
  margin-right: 5px;
}
.callmedad>.nmp{
  width: 800px;
}
</style>